package com.cb.domain.model.order;


import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Passenger Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 * 旅客信息
 */
@Entity
@Table(name="passenger")
public class Passenger implements Serializable {

    protected Long id;
	protected String name;
	protected String ageType;
	protected String cardType;
	protected String cardNum;
	protected String eticketNum;
	protected java.util.Date birthday;
	protected Long insuranceCount;
	protected String bxSource;
	protected String bxName;
	protected String sex;
	protected Double totalPrice;
	protected Double feePrice;
	protected Long ticketPtice;
	protected Long bxPrice;
	protected Long constructionFee;
	protected Long fuelTax;
	protected com.cb.domain.model.order.BOrder bOrder;

	protected java.util.Set<Insurance> insurances = new java.util.HashSet<Insurance>();

	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "orderId", unique = false, nullable = true, insertable = true, updatable = true)
	public com.cb.domain.model.order.BOrder getbOrder() {
		return bOrder;
	}

	public void setbOrder(com.cb.domain.model.order.BOrder bOrder) {
		this.bOrder = bOrder;
	}

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "passenger")
	public java.util.Set<Insurance>  getInsurances () {
		return insurances;
	}	
	
	public void setInsurances (java.util.Set<Insurance> in_insurances) {
		this.insurances = in_insurances;
	}
    

	/**
	 * 	 * @return Long
     * @hibernate.id column="id" type="java.lang.Long" generator-class="native"
	 */
	
	@Id     
    @GeneratedValue(generator="Id_Generator")
    @GenericGenerator(name="Id_Generator", strategy="com.cb.common.util.IdGenerator")
	public Long getId() {
		return this.id;
	}
	
	/**
	 * Set the id
	 */	
	public void setId(Long aValue) {
		this.id = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="name" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "name")	
	public String getName() {
		return this.name;
	}
	
	/**
	 * Set the name
	 */	
	public void setName(String aValue) {
		this.name = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="ageType" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "ageType")	
	public String getAgeType() {
		return this.ageType;
	}
	
	/**
	 * Set the ageType
	 */	
	public void setAgeType(String aValue) {
		this.ageType = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="cardType" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "cardType")	
	public String getCardType() {
		return this.cardType;
	}
	
	/**
	 * Set the cardType
	 */	
	public void setCardType(String aValue) {
		this.cardType = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="cardNum" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "cardNum")	
	public String getCardNum() {
		return this.cardNum;
	}
	
	/**
	 * Set the cardNum
	 */	
	public void setCardNum(String aValue) {
		this.cardNum = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="eticketNum" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "eticketNum")	
	public String getEticketNum() {
		return this.eticketNum;
	}
	
	/**
	 * Set the eticketNum
	 */	
	public void setEticketNum(String aValue) {
		this.eticketNum = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="birthday" type="java.util.Date" length="10" not-null="false" unique="false"
	 */
	
	@Column(name = "birthday")	
	public java.util.Date getBirthday() {
		return this.birthday;
	}
	
	/**
	 * Set the birthday
	 */	
	public void setBirthday(java.util.Date aValue) {
		this.birthday = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="insuranceCount" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "insuranceCount")	
	public Long getInsuranceCount() {
		return this.insuranceCount;
	}
	
	/**
	 * Set the insuranceCount
	 */	
	public void setInsuranceCount(Long aValue) {
		this.insuranceCount = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="bxSource" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	
	@Column(name = "bxSource")	
	public String getBxSource() {
		return this.bxSource;
	}
	
	/**
	 * Set the bxSource
	 */	
	public void setBxSource(String aValue) {
		this.bxSource = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="bxName" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	
	@Column(name = "bxName")	
	public String getBxName() {
		return this.bxName;
	}
	
	/**
	 * Set the bxName
	 */	
	public void setBxName(String aValue) {
		this.bxName = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="sex" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	
	@Column(name = "sex")	
	public String getSex() {
		return this.sex;
	}
	
	/**
	 * Set the sex
	 */	
	public void setSex(String aValue) {
		this.sex = aValue;
	}	

	/**
	 * 	 * @return Double
	 * @hibernate.property column="totalPrice" type="java.lang.Double" length="22" not-null="false" unique="false"
	 */
	
	@Column(name = "totalPrice")	
	public Double getTotalPrice() {
		return this.totalPrice;
	}
	
	/**
	 * Set the totalPrice
	 */	
	public void setTotalPrice(Double aValue) {
		this.totalPrice = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="feePrice" type="java.util.Date" length="10" not-null="false" unique="false"
	 */
	
	@Column(name = "feePrice")	
	public Double getFeePrice() {
		return this.feePrice;
	}
	
	/**
	 * Set the feePrice
	 */	
	public void setFeePrice(Double aValue) {
		this.feePrice = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="ticketPtice" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "ticketPtice")	
	public Long getTicketPtice() {
		return this.ticketPtice;
	}
	
	/**
	 * Set the ticketPtice
	 */	
	public void setTicketPtice(Long aValue) {
		this.ticketPtice = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="bxPrice" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "bxPrice")	
	public Long getBxPrice() {
		return this.bxPrice;
	}
	
	/**
	 * Set the bxPrice
	 */	
	public void setBxPrice(Long aValue) {
		this.bxPrice = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="constructionFee" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "constructionFee")	
	public Long getConstructionFee() {
		return this.constructionFee;
	}
	
	/**
	 * Set the constructionFee
	 */	
	public void setConstructionFee(Long aValue) {
		this.constructionFee = aValue;
	}	

	/**
	 * 	 * @return Long
	 * @hibernate.property column="fuelTax" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "fuelTax")	
	public Long getFuelTax() {
		return this.fuelTax;
	}
	
	/**
	 * Set the fuelTax
	 */	
	public void setFuelTax(Long aValue) {
		this.fuelTax = aValue;
	}	

}